<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Comparing two paired samples with the Student's t distribution</title>
<link rel="stylesheet" href="../../../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="Math Toolkit 4.1.0">
<link rel="up" href="../st_eg.html" title="Student's t Distribution Examples">
<link rel="prev" href="two_sample_students_t.html" title="Comparing the means of two samples with the Students-t test">
<link rel="next" href="../cs_eg.html" title="Chi Squared Distribution Examples">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="two_sample_students_t.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../st_eg.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../cs_eg.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="math_toolkit.stat_tut.weg.st_eg.paired_st"></a><a class="link" href="paired_st.html" title="Comparing two paired samples with the Student's t distribution">Comparing
          two paired samples with the Student's t distribution</a>
</h5></div></div></div>
<p>
            Imagine that we have a before and after reading for each item in the
            sample: for example we might have measured blood pressure before and
            after administration of a new drug. We can't pool the results and compare
            the means before and after the change, because each patient will have
            a different baseline reading. Instead we calculate the difference between
            before and after measurements in each patient, and calculate the mean
            and standard deviation of the differences. To test whether a significant
            change has taken place, we can then test the null-hypothesis that the
            true mean is zero using the same procedure we used in the single sample
            cases previously discussed.
          </p>
<p>
            That means we can:
          </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
                <a class="link" href="tut_mean_intervals.html" title="Calculating confidence intervals on the mean with the Students-t distribution">Calculate
                confidence intervals of the mean</a>. If the endpoints of the
                interval differ in sign then we are unable to reject the null-hypothesis
                that there is no change.
              </li>
<li class="listitem">
                <a class="link" href="tut_mean_test.html" title='Testing a sample mean for difference from a "true" mean'>Test
                whether the true mean is zero</a>. If the result is consistent
                with a true mean of zero, then we are unable to reject the null-hypothesis
                that there is no change.
              </li>
<li class="listitem">
                <a class="link" href="tut_mean_size.html" title="Estimating how large a sample size would have to become in order to give a significant Students-t test result with a single sample test">Calculate
                how many pairs of readings we would need in order to obtain a significant
                result</a>.
              </li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
      Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
      Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
      Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
      Walker and Xiaogang Zhang<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="two_sample_students_t.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../st_eg.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../cs_eg.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
